// pages/home/home.js
Component({
  /**
   * 引入全局样式
   */
  options: {
    addGlobalClass: true,
  },
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    swiperImgs: ['../../assets/1.jpg', '../../assets/2.jpg', '../../assets/3.jpg'],
    menuName: ['热门医院', '综合医院', '综合医院', '综合医院', '综合医院'],
    menuContent: [{
      menuName: '热门医院',
      content: [{
        name: '北京协和医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京大学第一医院',
        people: 80,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '解放军301医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京协和医院',
        people: 79,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      }]
    },{
      menuName: '热门医院',
      content: [{
        name: '北京协和医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京大学第一医院',
        people: 80,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '解放军301医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京协和医院',
        people: 79,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      }]
    }, {
      menuName: '热门医院',
      content: [{
        name: '北京协和医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京大学第一医院',
        people: 80,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '解放军301医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京协和医院',
        people: 79,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      }]
    }, {
      menuName: '热门医院',
      content: [{
        name: '北京协和医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京大学第一医院',
        people: 80,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '解放军301医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京协和医院',
        people: 79,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      }]
    }, {
      menuName: '热门医院',
      content: [{
        name: '北京协和医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京大学第一医院',
        people: 80,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '解放军301医院',
        people: 120,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      },{
        name: '北京协和医院',
        people: 79,
        grade: '三甲',
        img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1597126149074&di=a507af93d828f0006941bde77c655362&imgtype=0&src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181011%2Fc533cec5d5274a4a9e3a59eeb8fe7630.jpeg',
      }]
    }],
    currentMenu: 0,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    swichMenu(e) {
      console.log(e.target.dataset.current)
      if(this.currentMenu != e.target.dataset.current) {
        this.setData({
          currentMenu: e.target.dataset.current
        })
      }
    },

    /**
     * 预约挂号
     */
    orderNum() {    
      wx.redirectTo({
        url: 'orderNum/orderNum',
        success: (result) => {
          // console.log(result)
        },
        fail: (err) => {console.log('err', err)},
        complete: () => {}
      });
    },

    //前往健康科普
    goHealth() {
      wx.redirectTo({
        url: 'health/health',
        success: (result) => {
          // console.log(result)
        },
        fail: (err) => {console.log('err', err)},
        complete: () => {}
      });
    },

  }
})
